﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MusicNoteEffect : MonoBehaviour
{
    public float speed = 0.5f;
    public float time = 2f;
    // Start is called before the first frame update
    void Start()
    {
        Color color = new Color(Random.value, Random.value, Random.value);
        SpriteRenderer renderer = this.GetComponent<SpriteRenderer>();
        renderer.color = color;
        GameObject.Destroy(this.gameObject, time);
    }
    private void Update()
    {
        this.transform.Translate(Vector3.up * speed);
    }
}
